/*
 ============================================================================
 Name		: YuebaoFavoriteCanvasMyAccountContentPanel.h
 Author	  : 
 Version	 : 1.0
 Copyright   :
 Description : MyAccountContentPanel declaration
 ============================================================================
 */

#ifndef YuebaoPayUtility_H
#define YuebaoPayUtility_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "YuebaoTabControl.h"
#include "fFramework.h"
#include "InputNumberDlg.h"
#include "HttpEngine.h"
#include "YuebaoFavoriteTabControl.h"

// CLASS DECLARATION
class MyAccountListboxContentControl;
class NetworkEngine;
class CResponseBanks;
class BanksListboxDlg;
class InputNumberDlg;
class fDialog;
/**
 *  MyAccountContentPanel
 *
 */
class YuebaoPayUtility : public CBase, public HttpEngineObserver, public MDialogEventObserver
{
public:
    // Constructors and destructor

    /**
     * Destructor.
     */
    ~YuebaoPayUtility( );

    /**
     * Two-phased constructor.
     */
    static YuebaoPayUtility* NewL( fEngine * aEngine );

    /**
     * Two-phased constructor.
     */
    static YuebaoPayUtility* NewLC( fEngine * aEngine );

private:
    
    /**
     * Constructor for performing 1st stage construction
     */
    YuebaoPayUtility( );

    /**
     * EPOC default constructor for performing 2nd stage construction
     */
    void ConstructL( fEngine * aEngine );
private:
    fEngine* iEngine;
public:
    void Pay( );
protected:
    CHttpEngine* _httpEngine;
protected:
    void HttpFinished( const CHttpEngine& engine, int finishedReason, const TDesC8& aBodyData );
    char* HttpEngineObserverID( )
    {
        return "pay";
    }
private:
    enum TSavePointsStep
    {
        ENotReady, EGetBanks, EGetBanksUrl, EFinished,
    };

    TSavePointsStep _savePointsStep;

    CResponseBanks* _banks;

    BanksListboxDlg* _bankListDlg;
    InputNumberDlg* _inputNumberDlg;
protected:
    void HandleReturnEvent( fDialog* aObject, TReturnValue aValue );
    
};

#endif // YuebaoPayUtility
